﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Baitap10
{
    public abstract class Talk
    {
        public abstract void speak();
        public virtual void goodbye(){
            Console.WriteLine("Says goobye!");
        }

    }
    public class SayHello: Talk{
        public override void speak(){
            Console.WriteLine("Says Hello!");
        }
        public override void goobye()
        {
            WriteLine("ClassHello says goobye!");
        }
    }
    class Program{
        static void Main()
        {
            SayHello hello = new SayHello();
            hello.speak();
            hello.goobye();
        }
    }
}
